export interface DialogConfig {
  width?: number | string
  showLabel?: boolean
  labelWidth?: number
  layout: LayoutRow[]
}

export interface LayoutRow {
  gutter?: number
  colSpan?: number
  formItems: FormItem[]
}

/**
 * options       选项 (select radio等组件的选项)
 * optionsGetter 获取动态选项的 store 中的指定 getters
 * bind          可以直接 v-bind 的属性
 */
export interface FormItem {
  label: string
  prop: string
  type: FormItemType
  placeholder?: string
  default?: any
  options?: any[]
  optionsGetter?: string
  optionSlot?: string
  bind?: any
  rules?: any[]
}

export type FormItemType = 'input' | 'select' | 'number' | 'radio' | 'textarea' | 'switch' | 'datapicker' | 'cascader'
